package com.example.wsocket.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@Configuration
public class WebSocketConfig {

    /**
     * @return: org.springframework.web.socket.server.standard.ServerEndpointExporter
     * @decription 自动注册使用@ServerEndpoint注解声明的websocket endpoint
    */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}